﻿<Window x:Class="ParsecClient.SettingsWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Settings" Height="Auto" Width="500" WindowStyle="None" Background="Transparent" AllowsTransparency="True" ResizeMode="NoResize" WindowStartupLocation="CenterOwner" Loaded="Window_Loaded" ShowInTaskbar="False" SizeToContent="Height">
    <Border CornerRadius="3" BorderBrush="#FF444444" BorderThickness="1" Margin="15">
        <Grid Margin="10">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="Auto"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Row="0" FontSize="18" FontWeight="Normal" Foreground="#FF000000">Settings</TextBlock>
            <TabControl Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"  Margin="0 5" Height="300" Style="{StaticResource PlainTabControl}">
                <TabItem Header="Basic" Style="{StaticResource PlainTab}">
                    <Grid Grid.Row="1" Margin="5">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="*"></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="175"></ColumnDefinition>
                            <ColumnDefinition Width="*"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <Label Grid.Column="0" Grid.Row="0" Foreground="#FF000000">Log Folder</Label>
                        <Grid Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBox Name="txtLogLocation" Grid.Column="0" Grid.Row="0" Margin="4 0 0 0" Style="{StaticResource PlainTextBox}"></TextBox>
                            <Button Name="btnFolder" Grid.Column="1" Grid.Row="0" Margin="4 0 0 0" Click="btnFolder_Click" Style="{StaticResource PlainButton}">...</Button>
                        </Grid>
                        <Label Grid.Column="0" Grid.Row="2" Margin="0 10 0 0" Foreground="#FF000000">Always On Top</Label>
                        <CheckBox Name="chkAlwaysOnTop" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center"  Margin="0 10 0 0" Style="{StaticResource PlainCheckBox}"></CheckBox>
                        <Label Grid.Column="0" Grid.Row="3" Margin="0 10 0 0" Foreground="#FF000000">Opacity</Label>
                        <Slider Minimum="10" Maximum="100" Name="sldOpacity" Grid.Column="1" Grid.Row="3" ValueChanged="sldOpacity_ValueChanged" AutoToolTipPlacement="BottomRight" AutoToolTipPrecision="0" Margin="0 10 0 0"></Slider>
                        <Label Grid.Column="0" Grid.Row="4" Margin="0 10 0 0" Foreground="#FF000000">Timer Volume</Label>
                        <Slider Minimum="0" Maximum="100" Name="sldVolume" Grid.Column="1" Grid.Row="4" Margin="0 10 0 0" AutoToolTipPlacement="BottomRight" AutoToolTipPrecision="0" TickFrequency="1" LargeChange="10" SmallChange="1" IsSnapToTickEnabled="True" Thumb.DragStarted="sldVolume_DragStarted" Thumb.DragCompleted="sldVolume_DragCompleted" ValueChanged="sldVolume_ValueChanged"></Slider>
                    </Grid>
                </TabItem>
                <TabItem Header="Time Sync" Style="{StaticResource PlainTab}">
                    <Grid Grid.Row="1" Margin="5">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="175"></ColumnDefinition>
                            <ColumnDefinition Width="*"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <Label Grid.Column="0" Grid.Row="0" Foreground="#FF000000">Time Server Status</Label>
                        <TextBlock Name="txtTimeServerStatus" Grid.Column="1" Grid.Row="0" Foreground="#FF666666" TextWrapping="Wrap"></TextBlock>
                        <Label Grid.Column="0" Grid.Row="2" Foreground="#FF000000">Enable Time Server Syncing</Label>
                        <CheckBox Name="chkTimeServerSyncEnabled" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" Style="{StaticResource PlainCheckBox}" HorizontalAlignment="Left" Checked="chkTimeServerSyncEnabled_Checked" Unchecked="chkTimeServerSyncEnabled_Checked"/>
                        <Label Name="lblTimeServerUseDefault" Grid.Column="0" Grid.Row="3" Foreground="#FF000000">Use Default Settings</Label>
                        <CheckBox Name="chkTimeServerUseDefault" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" Style="{StaticResource PlainCheckBox}" HorizontalAlignment="Left"  Checked="chkTimeServerUseDefault_Checked" Unchecked="chkTimeServerSyncEnabled_Checked"/>
                        <Label Name="lblTimeServerHost" Grid.Column="0" Grid.Row="4" Foreground="#FF000000">Time Server Host Name</Label>
                        <TextBox Name="txtTimeServerHost" Grid.Column="1" Grid.Row="4" Margin="0 2 0 0" Style="{StaticResource PlainTextBox}"></TextBox>
                        <Label Name="lblTimeServerPort" Grid.Column="0" Grid.Row="5" Foreground="#FF000000">Time Server Port</Label>
                        <TextBox Name="txtTimeServerPort" Grid.Column="1" Grid.Row="5" Margin="0 2 0 0" Style="{StaticResource PlainTextBox}"></TextBox>
                        <Button Name="btnRefreshSync" Margin="0 2 0 20" Grid.Column="1" Grid.Row="1" Padding="2" Click="btnRefreshSync_Click" Style="{StaticResource PlainButton}">Refresh Sync</Button>
                        <Button Name="btnTestTimeServer" Margin="0 2 0 0" Grid.Column="1" Grid.Row="6" Padding="2" Click="btnTestTimeServer_Click" Style="{StaticResource PlainButton}">Test Time Server Settings</Button>
                    </Grid>
                </TabItem>
                <TabItem Header="Character Settings" Style="{StaticResource PlainTab}">
                    <Grid Grid.Row="1" Margin="5">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="*"></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <ComboBox Grid.Row="0" Grid.Column="0" Name="ddlCharacters" SelectionChanged="ddlCharacters_SelectionChanged" Margin="0 4 0 0" />
                        <Grid Margin="0 10 0 5" Grid.Row="1" Grid.Column="0" Height="200">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"></RowDefinition>
                                <RowDefinition Height="Auto"></RowDefinition>
                                <RowDefinition Height="Auto"></RowDefinition>
                                <RowDefinition Height="Auto"></RowDefinition>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="175"></ColumnDefinition>
                                <ColumnDefinition Width="*"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <Label Grid.Column="0" Grid.Row="0" Foreground="#FF000000">Absorb Shield Value</Label>
                            <Grid Grid.Column="1" Grid.Row="0" Name="grdShieldValue">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"></RowDefinition>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"></ColumnDefinition>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <TextBox Name="txtShieldValue" Grid.Column="0" Grid.Row="0" Margin="0 2 0 0" Style="{StaticResource PlainTextBox}" TextChanged="txtShieldValue_TextChanged"></TextBox>
                                <Button Name="btnCalc" Grid.Column="1" Grid.Row="0" Padding="10 2 10 2" Margin="4 2 0 0" Click="btnCalc_Click" Style="{StaticResource PlainButton}">Calculator</Button>
                            </Grid>
                            <Button Name="btnResetCharacter" Grid.Column="1" Grid.Row="2" Padding="10 2 10 2" Margin="0 10 0 0" Click="btnResetCharacter_Click" Style="{StaticResource PlainButton}">Reset Character Settings</Button>
                            <GroupBox Grid.Column="1" Grid.Row="0"  Header="Absorb Shield Calculator" Name="boxCalculator" Visibility="Collapsed">
                                <Grid Margin="0">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"></RowDefinition>
                                        <RowDefinition Height="Auto"></RowDefinition>
                                        <RowDefinition Height="Auto"></RowDefinition>
                                        <RowDefinition Height="Auto"></RowDefinition>
                                        <RowDefinition Height="Auto"></RowDefinition>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="*"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <RadioButton Name="rdoSage" GroupName="classDomain" Margin="2 2 0 2" Style="{StaticResource PlainRadio}" Grid.Column="0" Grid.Row="0" Checked="ShieldCalcCheckedHandler" Unchecked="ShieldCalcCheckedHandler">
                                        <TextBlock DockPanel.Dock="Right" Foreground="#FF666666" FontSize="10">Sage/Sorc</TextBlock>
                                    </RadioButton>
                                    <RadioButton Name="rdoKnight" GroupName="classDomain" Margin="0 2 0 2" Style="{StaticResource PlainRadio}" Grid.Column="1" Grid.Row="0" Checked="ShieldCalcCheckedHandler" Unchecked="ShieldCalcCheckedHandler">
                                        <TextBlock DockPanel.Dock="Right" Foreground="#FF666666" FontSize="10">Knight/Jugg</TextBlock>
                                    </RadioButton>
                                    <Label Grid.Column="0" Grid.Row="1" Foreground="#FF000000">Bonus Healing</Label>
                                    <Label Grid.Column="0" Grid.Row="2" Foreground="#FF000000" Name="lblPctBonus">10% Talent</Label>
                                    <Label Grid.Column="0" Grid.Row="3" Foreground="#FF000000" FontWeight="Bold">Total</Label>
                                    <TextBox Name="txtBonusHeals" Grid.Column="1" Grid.Row="1" Margin="0 2 0 0" Style="{StaticResource PlainTextBox}" TextChanged="txtBonusHeals_TextChanged"></TextBox>
                                    <CheckBox Name="chkAddTenPct" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center"  Margin="0 2 0 0" Style="{StaticResource PlainCheckBox}" Checked="chkAddTenPct_Checked" Unchecked="chkAddTenPct_Unchecked"></CheckBox>
                                    <Grid Grid.Column="1" Grid.Row="3" Margin="0 0 0 0">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        </Grid.ColumnDefinitions>
                                        <TextBox Name="txtCalcTotal" Grid.Column="0" Grid.Row="0" Margin="0 0 4 0" Style="{StaticResource PlainTextBox}" Foreground="#FF000000" FontWeight="Bold" IsEnabled="True"></TextBox>
                                        <Button Name="btnUseCalc" Grid.Column="1" Grid.Row="0" Padding="8 2 8 2" Click="btnUseCalc_Click" Style="{StaticResource PlainButton}">Apply</Button>
                                    </Grid>
                                    <Button Name="btnCancelCalc" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="2"  Padding="5 0 5 2" Margin="0 0 0 4" Click="btnCancelCalc_Click" Style="{StaticResource PlainButton}">Cancel</Button>
                                </Grid>
                            </GroupBox>
                        </Grid>
                    </Grid>
                </TabItem>
                <TabItem Header="Advanced" Style="{StaticResource PlainTab}">
                    <Grid Grid.Row="1" Margin="5">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="*"></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="175"></ColumnDefinition>
                            <ColumnDefinition Width="*"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <Label Grid.Column="0" Grid.Row="0" Margin="0 10 0 0" Foreground="Black">Stream Mode</Label>
                        <CheckBox Name="chkStreamMode" Grid.Column="1" Grid.Row="0" VerticalAlignment="Center"  Margin="0 10 0 0" DataContext="{Binding}" Style="{StaticResource PlainCheckBox}"></CheckBox>
                        <TextBlock Grid.Column="0" Grid.Row="1"  Grid.ColumnSpan="2" Margin="10 2 0 2" TextWrapping="Wrap" FontSize="11" Foreground="#FF444444">
                    <Run>The </Run>
                    <Bold>Stream Mode</Bold>
                    <Run>setting will allow parsec to be streamed using OBS by removing transparency. You must set OBS to Disable Aero in Windows 7+</Run>
                    <LineBreak></LineBreak>
                    <LineBreak></LineBreak>
                    <Run>Note: Changes to this setting will only take effect after you restart Parsec</Run>
                        </TextBlock>
                        <Label Grid.Column="0" Grid.Row="2" Margin="0 10 0 0" Foreground="Black">
                            <TextBlock TextWrapping="Wrap">Disable Hardware Acceleration</TextBlock>
                        </Label>
                        <CheckBox Name="chkDisableHwAccel" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center"  Margin="0 10 0 0" Style="{StaticResource PlainCheckBox}"></CheckBox>
                        <TextBlock Grid.Column="0" Grid.Row="3"  Grid.ColumnSpan="2" Margin="10 2 0 2" TextWrapping="Wrap" FontSize="11" Foreground="#FF444444">
                    <Run>The </Run>
                    <Bold>Disable Hardware Acceleration</Bold>
                    <Run>setting will run parsec in software rendering compatability mode. Performance may be negatively impacted. Only use this setting if you experience problems.</Run>
                    <LineBreak></LineBreak>
                    <LineBreak></LineBreak>
                    <Run>Note: Changes to this setting will only take effect after you restart Parsec</Run>
                        </TextBlock>
                    </Grid>
                </TabItem>
            </TabControl>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="2">
                <Button Name="btnRestore" Margin="0 0 8 0" Padding="2" Click="btnRestore_Click" Style="{StaticResource PlainButton}">Restore Defaults</Button>
                <Button Name="btnOk" Margin="0 0 8 0" Padding="2" Width="60" Click="btnOk_Click" Style="{StaticResource PlainButton}">Save</Button>
                <Button Name="btnCancel" Padding="2" Width="60" Click="btnCancel_Click" Style="{StaticResource PlainButton}">Cancel</Button>
            </StackPanel>
        </Grid>
        <Border.Effect>
            <DropShadowEffect BlurRadius="15" ShadowDepth="0" Opacity=".8" />
        </Border.Effect>
        <Border.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFF2F2F2" Offset="0" />
                <GradientStop Color="White" Offset="1" />
            </LinearGradientBrush>
        </Border.Background>
    </Border>
</Window>
